<?php

/**
 * Load the data from person table.
 * @param field: the field user want to query on
 * @param value: the value to be checked.
 * 
 * @return an array of the first record got from the query, or empty array if 
 *    there's no result.
 */
function hgn_core_db_load_from_table($table_name,$field,$value){
  return db_select($table_name,'t')->condition($field,$value)->fields('t')->execute()->fetchAssoc();
}

/**
 * 
 */